home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_02_04
/
2n04036b
< prev
next >
Wrap
Text File
|
1991-02-16
|
493b
|
22 lines
/*
* boot(): function to warm or cold boot the system from software
*
* C Calling sequence:
* boot (int flag);
* where flag is 0 perform a warm boot, or anything
* to perform a cold boot.
*/
void boot(int flag)
{
/* flag address */
int far *WarmFlag = (int far *) 0x0040072;
/* reboot address */
void (far *reboot)(void) = (void far *) 0xFFFF0000;
*WarmFlag = 0x1234 | flag;
(*reboot)();
}